-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI/DataTable: initialize with Order and Range #8106
UI/DataTable: initialize with Order and Range #8106
Conversation
552c12f
to
94658d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nhaagen,
Thx a lot for your contribution to the UI framework.
About the concrete changes, please answer the following questions:
-
Data::withNumberOfRows()
usages: could you check if there are any usages of this method inside ILIAS? And, it it is not too much work, maybe directly replace these calls, so we can request reviews in this PR.
Otherwise this LGTM and should solve both mantis issues. Since we are removing an interface method, we need to go to JF before we can merge this.
Kind regards,
@thibsy
There were, in fact, but two occurences of "withNumberOfRows"; I replaced those. |
)->withNumberOfRows( | ||
$this->request->getItemsPerPage() | ||
)->withRange( | ||
new Range(0, $this->request->getItemsPerPage()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nhaagen Wouldn't that mean that only the first X entries are displayed? Or would the pagination itself then update that? I'm just a little confused about the static “0”.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nhaagen Ok, I think I understand it now, it's really just about the default values :-) That's fine with me, thank you very much!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nhaagen just noticed there's something wrong with the code-style of the changed files. Could you amend this, before we merge? Thx! |
Jour Fixe, 30 SEP 2024: We accept the suggested changes for ILIAS 10/trunk. |
…ering and range. (ILIAS-eLearning#8106) * Fix https://mantis.ilias.de/view.php?id=41328 * Fix https://mantis.ilias.de/view.php?id=42095 * Remove Table\Data::withNumberOfRows() * Replace IRSS usage of removed method
https://mantis.ilias.de/view.php?id=41328
Optionally initialize a DataTable with Range and/or Order.
This includes the fix from #8083
Also, I removed withNumberOfRows/getNumberOfRows from the interface in favour of (allready existing) get-/withRange.